import config
import db
import importlib, sys

importlib.reload(sys)

ai_conn = db.ai_conn(
    config.poolsize,
    config.host,
    config.user,
    config.passwd,
    config.db,
    config.port,
    config.dbchar,
)
ai_conn.create_pool()


def test():
    sql = """
    select 1
    """
    result = ai_conn.get_data(sql)
    l = []
    for i in result:
        d = {}
        d["src_name"] = i[0]
        l.append(d)
    return l
